package com.abel.quiz.vo;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import java.util.ArrayList;
import java.util.List;

import com.abel.quiz.po.RelUserRolePo;

/**
* @author abel.lin
* @date_time 2017-08-04 13:57
* @description
*/
public class RelUserRoleDomain extends RelUserRolePo {

    public static RelUserRoleDomain genDomain(RelUserRolePo model){
        if(model == null){
            model = new RelUserRolePo();
        }
        RelUserRoleDomain domain = JSON.parseObject(JSON.toJSONString(model), RelUserRoleDomain.class);
        return domain;
    }

    public static List<RelUserRoleDomain> genDomainList(List<RelUserRolePo> modelList){
        if(modelList == null){
            modelList = new ArrayList<RelUserRolePo>();
        }
        List<RelUserRoleDomain> domainList = JSONArray.parseArray(JSONArray.toJSONString(modelList), RelUserRoleDomain.class);
        return domainList;
    }

}
